/*
 * @Author: 0x9DEFA478
 * @Date: 2021-09-18 23:20:59
 * @LastEditTime: 2022-06-26 17:06:38
 * @LastEditors: 0x9DEFA478
 * @Description: 
 * QQ:2652450237
 * ============================================================================================================================================
 * 
 * 
 * 
 *                                                                                               ************      ****************************
 *                                                                                             ************      ****************************  
 *                                                                                           ************      ****************************    
 *                                                                                         ************      ****************************      
 *                                                                                       ************      ************                        
 *                                                                                     ************      ************                          
 *                                                                                   ************      ************                            
 *                                                                                 ************      ************                              
 *                                                                               ************      ************                                
 *                                                                             ************      ************                                  
 *                                                                           ************      ************                                    
 *                                                                         ************      ************                                      
 *                                                                       ************      ************                                        
 *                                                                     ************      ************                                          
 *                                                                   ************      ************                                            
 *                                                                 ************      ************                                              
 *                                                               ************      ************                                                
 *                                                             ************      ************                                                  
 *                                                           ************      ************                                                    
 *                                                         ************      ************                                                      
 *                                                       ************      ************                                                        
 *                                                     ************      ************                                                          
 *                                                   ************      ************                                                            
 *                                                 ************      ************                                                              
 *                                               ************      ************                                                                
 *                                             ************      ************                                                                  
 *                                           ************      ************                                                                    
 *                                         ************      ************                                                                      
 *                                       ************      ************                                                                        
 *                                     ************      ************                                                                          
 *                                   ************      ************                                                                            
 *                                 ************      ************                                                                              
 *                               ************      ************                                                                                
 *                             ************      ************                                                                                  
 *                           ************      ************                                                                                    
 *                         ************      ************                                                                                      
 *       ****************************      ************                                                                                        
 *     ****************************      ************                                                                                          
 *   ****************************      ************                                                                                            
 * ****************************      ************                                                                                              
 * 
 * 
 * 
 * ============================================================================================================================================
 * 
 */
#include "Peripheral.h"




static volatile IP_IRQ_Call_Def DMA2D_IRQ_Call={.IP_IRQ_Callback=NULL,.v=NULL};

// static volatile IP_IRQ_Call_Def ETH_IRQ_Call={.IP_IRQ_Callback=NULL,.v=NULL};

static volatile IP_IRQ_Call_Def EXTI0_IRQ_Call={.IP_IRQ_Callback=NULL,.v=NULL};
static volatile IP_IRQ_Call_Def EXTI1_IRQ_Call={.IP_IRQ_Callback=NULL,.v=NULL};
static volatile IP_IRQ_Call_Def EXTI2_IRQ_Call={.IP_IRQ_Callback=NULL,.v=NULL};
static volatile IP_IRQ_Call_Def EXTI3_IRQ_Call={.IP_IRQ_Callback=NULL,.v=NULL};
static volatile IP_IRQ_Call_Def EXTI4_IRQ_Call={.IP_IRQ_Callback=NULL,.v=NULL};
static volatile IP_IRQ_Call_Def EXTI9_5_IRQ_Call={.IP_IRQ_Callback=NULL,.v=NULL};
static volatile IP_IRQ_Call_Def EXTI15_10_IRQ_Call={.IP_IRQ_Callback=NULL,.v=NULL};

// static volatile IP_IRQ_Call_Def I2C1_EV_IRQ_Call={.IP_IRQ_Callback=NULL,.v=NULL};
// static volatile IP_IRQ_Call_Def I2C1_ER_IRQ_Call={.IP_IRQ_Callback=NULL,.v=NULL};

// static volatile IP_IRQ_Call_Def LTDC_IRQ_Call={.IP_IRQ_Callback=NULL,.v=NULL};
// static volatile IP_IRQ_Call_Def LTDC_ER_IRQ_Call={.IP_IRQ_Callback=NULL,.v=NULL};

static volatile IP_IRQ_Call_Def MDMA_IRQ_Call={.IP_IRQ_Callback=NULL,.v=NULL};

static volatile IP_IRQ_Call_Def OTG_FS_IRQ_Call={.IP_IRQ_Callback=NULL,.v=NULL};
static volatile IP_IRQ_Call_Def OTG_HS_IRQ_Call={.IP_IRQ_Callback=NULL,.v=NULL};

static volatile IP_IRQ_Call_Def SDMMC1_IRQ_Call={.IP_IRQ_Callback=NULL,.v=NULL};

static volatile IP_IRQ_Call_Def USART1_IRQ_Call={.IP_IRQ_Callback=NULL,.v=NULL};




void DMA2D_SetIrqCallback(void (*IP_IRQ_Callback)(void*),void* v){
  DMA2D_IRQ_Call.v=v;
  DMA2D_IRQ_Call.IP_IRQ_Callback=IP_IRQ_Callback;
}




// void ETH_SetIrqCallback(void (*IP_IRQ_Callback)(void*),void* v){
//   ETH_IRQ_Call.v=v;
//   ETH_IRQ_Call.IP_IRQ_Callback=IP_IRQ_Callback;
// }




void EXTI0_SetIrqCallback(void (*IP_IRQ_Callback)(void*),void* v){
  EXTI0_IRQ_Call.v=v;
  EXTI0_IRQ_Call.IP_IRQ_Callback=IP_IRQ_Callback;
}

void EXTI1_SetIrqCallback(void (*IP_IRQ_Callback)(void*),void* v){
  EXTI1_IRQ_Call.v=v;
  EXTI1_IRQ_Call.IP_IRQ_Callback=IP_IRQ_Callback;
}

void EXTI2_SetIrqCallback(void (*IP_IRQ_Callback)(void*),void* v){
  EXTI2_IRQ_Call.v=v;
  EXTI2_IRQ_Call.IP_IRQ_Callback=IP_IRQ_Callback;
}

void EXTI3_SetIrqCallback(void (*IP_IRQ_Callback)(void*),void* v){
  EXTI3_IRQ_Call.v=v;
  EXTI3_IRQ_Call.IP_IRQ_Callback=IP_IRQ_Callback;
}

void EXTI4_SetIrqCallback(void (*IP_IRQ_Callback)(void*),void* v){
  EXTI4_IRQ_Call.v=v;
  EXTI4_IRQ_Call.IP_IRQ_Callback=IP_IRQ_Callback;
}

void EXTI9_5_SetIrqCallback(void (*IP_IRQ_Callback)(void*),void* v){
  EXTI9_5_IRQ_Call.v=v;
  EXTI9_5_IRQ_Call.IP_IRQ_Callback=IP_IRQ_Callback;
}

void EXTI15_10_SetIrqCallback(void (*IP_IRQ_Callback)(void*),void* v){
  EXTI15_10_IRQ_Call.v=v;
  EXTI15_10_IRQ_Call.IP_IRQ_Callback=IP_IRQ_Callback;
}




// void I2C1_EV_SetIrqCallback(void (*IP_IRQ_Callback)(void*),void* v){
//   I2C1_EV_IRQ_Call.v=v;
//   I2C1_EV_IRQ_Call.IP_IRQ_Callback=IP_IRQ_Callback;
// }

// void I2C1_ER_SetIrqCallback(void (*IP_IRQ_Callback)(void*),void* v){
//   I2C1_ER_IRQ_Call.v=v;
//   I2C1_ER_IRQ_Call.IP_IRQ_Callback=IP_IRQ_Callback;
// }




// void LTDC_SetIrqCallback(void (*IP_IRQ_Callback)(void*),void* v){
//   LTDC_IRQ_Call.v=v;
//   LTDC_IRQ_Call.IP_IRQ_Callback=IP_IRQ_Callback;
// }

// void LTDC_ER_SetIrqCallback(void (*IP_IRQ_Callback)(void*),void* v){
//   LTDC_ER_IRQ_Call.v=v;
//   LTDC_ER_IRQ_Call.IP_IRQ_Callback=IP_IRQ_Callback;
// }




void MDMA_SetIrqCallback(void (*IP_IRQ_Callback)(void*),void* v){
  MDMA_IRQ_Call.v=v;
  MDMA_IRQ_Call.IP_IRQ_Callback=IP_IRQ_Callback;
}




void OTG_FS_SetIrqCallback(void (*IP_IRQ_Callback)(void*),void* v){
  OTG_FS_IRQ_Call.v=v;
  OTG_FS_IRQ_Call.IP_IRQ_Callback=IP_IRQ_Callback;
}

void OTG_HS_SetIrqCallback(void (*IP_IRQ_Callback)(void*),void* v){
  OTG_HS_IRQ_Call.v=v;
  OTG_HS_IRQ_Call.IP_IRQ_Callback=IP_IRQ_Callback;
}




void SDMMC1_SetIrqCallback(void (*IP_IRQ_Callback)(void*),void* v){
  SDMMC1_IRQ_Call.v=v;
  SDMMC1_IRQ_Call.IP_IRQ_Callback=IP_IRQ_Callback;
}




void USART1_SetIrqCallback(void (*IP_IRQ_Callback)(void*),void* v){
  USART1_IRQ_Call.v=v;
  USART1_IRQ_Call.IP_IRQ_Callback=IP_IRQ_Callback;
}








void DMA2D_IRQHandler(){
  DMA2D_IRQ_Call.IP_IRQ_Callback(DMA2D_IRQ_Call.v);
}




// void ETH_IRQHandler(){
//   ETH_IRQ_Call.IP_IRQ_Callback(ETH_IRQ_Call.v);
// }




void EXTI0_IRQHandler(){
  EXTI0_IRQ_Call.IP_IRQ_Callback(EXTI0_IRQ_Call.v);
}
void EXTI1_IRQHandler(){
  EXTI1_IRQ_Call.IP_IRQ_Callback(EXTI1_IRQ_Call.v);
}
void EXTI2_IRQHandler(){
  EXTI2_IRQ_Call.IP_IRQ_Callback(EXTI2_IRQ_Call.v);
}
void EXTI3_IRQHandler(){
  EXTI3_IRQ_Call.IP_IRQ_Callback(EXTI3_IRQ_Call.v);
}
void EXTI4_IRQHandler(){
  EXTI4_IRQ_Call.IP_IRQ_Callback(EXTI4_IRQ_Call.v);
}
void EXTI9_5_IRQHandler(){
  EXTI9_5_IRQ_Call.IP_IRQ_Callback(EXTI9_5_IRQ_Call.v);
}
void EXTI15_10_IRQHandler(){
  EXTI15_10_IRQ_Call.IP_IRQ_Callback(EXTI15_10_IRQ_Call.v);
}




// void I2C1_EV_IRQHandler(){
//   I2C1_EV_IRQ_Call.IP_IRQ_Callback(I2C1_EV_IRQ_Call.v);
// }
// void I2C1_ER_IRQHandler(){
//   I2C1_ER_IRQ_Call.IP_IRQ_Callback(I2C1_ER_IRQ_Call.v);
// }




// void LTDC_IRQHandler(){
//   LTDC_IRQ_Call.IP_IRQ_Callback(LTDC_IRQ_Call.v);
// }
// void LTDC_ER_IRQHandler(){
//   LTDC_ER_IRQ_Call.IP_IRQ_Callback(LTDC_ER_IRQ_Call.v);
// }




void MDMA_IRQHandler(){
  MDMA_IRQ_Call.IP_IRQ_Callback(MDMA_IRQ_Call.v);
}




void OTG_FS_IRQHandler(){
  OTG_FS_IRQ_Call.IP_IRQ_Callback(OTG_FS_IRQ_Call.v);
}

void OTG_HS_IRQHandler(){
  OTG_HS_IRQ_Call.IP_IRQ_Callback(OTG_HS_IRQ_Call.v);
}




void SDMMC1_IRQHandler(){
  SDMMC1_IRQ_Call.IP_IRQ_Callback(SDMMC1_IRQ_Call.v);
}




void USART1_IRQHandler(){
  USART1_IRQ_Call.IP_IRQ_Callback(USART1_IRQ_Call.v);
}



